﻿
package bsplib.q3bsp;
import flash.utils.ByteArray;

class Q3Texture 
{
    public var name : String;
    public var flags : Int;
    public var contents : Int;
    
    public static inline var DIR_INDEX : UInt = 1;

    public function new( data : ByteArray )
    {
        name = "";
        for ( i in 0...64 ) {
            var char = data.readByte();
            if ( char == 0 ) {
                data.position += 63 - i;
                break;
            }
            name += String.fromCharCode( char );
        }
        
        flags = data.readInt();
        contents = data.readInt();
    }
    
}